<@realgodo.admin_html>
	<div class="title">
		<h1>公告管理</h1>
		<span class="tTip"></span>
	</div>
	<div class="box">
		<div class="tx_table" id="info_list">
			<div class="data">
				<table class="l_tc">
					<caption>公告列表&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="${base}/admin/info/index!add">添加</a></caption>
					<thead>
						<tr>
							<th>序号</th>
							<th>内容</th>
							<th>发布时间</th>
							<th>状态</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody>
						<#list infoPage.result as info>
							<tr <#if info_index%2 != 0> class="c_odd" </#if>>
								<td>${info_index+1+(infoPage.pageNo-1)*10}</td>
								<td>${info.title!}</td>
								<td><#if info.status==1>${(info.pubDate?string('yyyy-MM-dd hh:mm:ss'))!}</#if></td>
								<td><#if info.status==1>已发布<#else>未发布</#if></td>
								<td>
									<#if info.status!=1>
									<a class="c_modi" href="${base}/admin/info/index!edit?id=${info.id?c}">编辑</a>
									<a class="c_modi" style="cursor:pointer;" onclick="pubInfo('${info.id?c}')">发布</a>
									</#if>
									<a class="c_modi" style="cursor:pointer;" onclick="delInfo('${info.id?c}')">删除</a>
								</td>
							</tr>
						</#list>
					</tbody>
				</table>
			</div>
			<@realgodo.pagination_admin div="info_list" />
		</div>
	</div>
<script type="text/javascript">
	function delInfo(id){
		if(window.confirm("你确认删除该条公告记录吗？该操作无法撤销.")){
			window.location.href="${base}/admin/info/index!delete?id=" + id;
		}
	}
	
	function pubInfo(id){
		if(window.confirm("你确认发布该条公告记录吗？")){
			window.location.href="${base}/admin/info/index!pub?id=" + id;
		}
	}
</script>
</@realgodo.admin_html>